#include <iostream>
#include <string.h>
using namespace std;

class person
{
public:
    void getName(char *na)
    {
        strcpy(name, na);
    }
    void getAge(int &a)
    {
        age = a;
    }

private:
    int age;
    char name[100];
};

int main()
{
    person p1;
    char name[100] = "张三";
    int age = 20;

    p1.getName(name);
    p1.getAge(age);

    cout << "name = " << name << endl;
    cout << "age = " << age << endl;

    return 0;
}